/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:45 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class Chungchi_HocvienEntity
    {
        public Chungchi_HocvienEntity()
        {
			m_pk_ichungchi_hocvienid=0;
			m_fk_ichungchiid=0;
			m_fk_ihocvienid=0;
			m_ssochungchi="";
			m_dngaycap=DateTime.Now;
			m_itrangthai=0;
        }
		private Int64 m_pk_ichungchi_hocvienid;
		public Int64 PK_iChungchi_HocvienID
		{
			get { return m_pk_ichungchi_hocvienid ; }
			set { m_pk_ichungchi_hocvienid = value; }
		}
		private Int16 m_fk_ichungchiid;
		public Int16 FK_iChungchiID
		{
			get { return m_fk_ichungchiid ; }
			set { m_fk_ichungchiid = value; }
		}
		private Int64 m_fk_ihocvienid;
		public Int64 FK_iHocvienID
		{
			get { return m_fk_ihocvienid ; }
			set { m_fk_ihocvienid = value; }
		}
		private String m_ssochungchi;
		public String sSochungchi
		{
			get { return m_ssochungchi ; }
			set { m_ssochungchi = value; }
		}
		private DateTime m_dngaycap;
		public DateTime dNgaycap
		{
			get { return m_dngaycap ; }
			set { m_dngaycap = value; }
		}
		private Int16 m_itrangthai;
		public Int16 iTrangthai
		{
			get { return m_itrangthai ; }
			set { m_itrangthai = value; }
		}

        #region Comparison
        public static List<Chungchi_HocvienEntity> Sort(List<Chungchi_HocvienEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(Chungchi_HocvienEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<Chungchi_HocvienEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<Chungchi_HocvienEntity> COMPARISON_PK_iChungchi_HocvienID
		{
			get
			{
				return delegate(Chungchi_HocvienEntity entity,Chungchi_HocvienEntity other)
				{
					return entity.PK_iChungchi_HocvienID.CompareTo(other.PK_iChungchi_HocvienID);
				};
			}
		}
		public static Comparison<Chungchi_HocvienEntity> COMPARISON_FK_iChungchiID
		{
			get
			{
				return delegate(Chungchi_HocvienEntity entity,Chungchi_HocvienEntity other)
				{
					return entity.FK_iChungchiID.CompareTo(other.FK_iChungchiID);
				};
			}
		}
		public static Comparison<Chungchi_HocvienEntity> COMPARISON_FK_iHocvienID
		{
			get
			{
				return delegate(Chungchi_HocvienEntity entity,Chungchi_HocvienEntity other)
				{
					return entity.FK_iHocvienID.CompareTo(other.FK_iHocvienID);
				};
			}
		}
		public static Comparison<Chungchi_HocvienEntity> COMPARISON_sSochungchi
		{
			get
			{
				return delegate(Chungchi_HocvienEntity entity,Chungchi_HocvienEntity other)
				{
					return entity.sSochungchi.CompareTo(other.sSochungchi);
				};
			}
		}
		public static Comparison<Chungchi_HocvienEntity> COMPARISON_dNgaycap
		{
			get
			{
				return delegate(Chungchi_HocvienEntity entity,Chungchi_HocvienEntity other)
				{
					return entity.dNgaycap.CompareTo(other.dNgaycap);
				};
			}
		}
		public static Comparison<Chungchi_HocvienEntity> COMPARISON_iTrangthai
		{
			get
			{
				return delegate(Chungchi_HocvienEntity entity,Chungchi_HocvienEntity other)
				{
					return entity.iTrangthai.CompareTo(other.iTrangthai);
				};
			}
		}
        #endregion
    }
}
